package com.yushu.authority.service;

import com.baomidou.mybatisplus.service.IService;
import com.yushu.authority.pojo.bo.PmMenu;
import com.yushu.authority.pojo.vo.MenuOnRoleVO;
import com.yushu.authority.pojo.vo.PmMenuTreeVO;
import com.yushu.authority.pojo.vo.PmMenuVO;
import com.yushu.common.util.pager.Pages;

import java.util.List;
import java.util.Map;


/**
 * 
 * @author test
 * @CreateDate 2020-12-03 15:47:25
 */
public interface PmMenuService extends IService<PmMenu> {
    Pages<PmMenuVO> page(Pages<PmMenuVO> page);

    boolean deleteBatch(List<PmMenu> pmMenus);

    PmMenu updateByKey(PmMenu pmMenu);

    String checkRepeat(Map map);

    List<PmMenu> selectList(PmMenu pmMenu);

    List<PmMenu> queryAllMenus();


    /**
     * TODO mybatis递归查询
     *
     * @return
     */
    List<PmMenuTreeVO> queryMenuTree();

    /*查询最大序号*/
    int selectMaxSortId(String dataBaseId);


    /**
     * <pre>通过表的进本信息删除菜单
     * </pre>
     *
     * @param
     * @return
     * @author qiuyuchun <qiuyuchun@163.com>
     * @version 1.0
     * @since 2019/8/27 13:38
     */

    void deleteMenuOnMenu(String databaseId, PmMenu menu);

    boolean insert(String databaseId, PmMenu menu);

    void deleteMenuOnRole(String dataBaseId, List<MenuOnRoleVO> onRoleVOS);

    void insertMenuOnRole(String dataBaseId, List<MenuOnRoleVO> onRoleVOS);
	 
	 public String validatemenuName(String menuName, String key);

    public String validateUrl(String url, String key);
}

